//引入封装好的get,post
import http from './index';
// ----------------------菜单管理------------------------
//菜单列表
export const getMenuList = ()=>http.get('/api/menulist',{istree:1})
//菜单的添加
export const menuAdd = (data:any)=>http.post('/api/menuadd',data)
//菜单详情
export const menuInfo = (data:any)=>http.get('/api/menuinfo',data)
//菜单修改
export const menuEdit = (data:any)=>http.post('/api/menuedit',data)
//菜单删除
export const menuDelete = (data:any)=>http.post('/api/menudelete',data)
// ----------------------角色管理------------------------
//角色列表
export const getrolelist = ()=>http.get('/api/rolelist')
//角色的添加
export const roleadd = (data:any)=>http.post('/api/roleadd',data)
//角色获取
export const roleinfo = (data:any)=>http.get('/api/roleinfo',data)
//角色修改
export const roleedit = (data:any)=>http.post('/api/roleedit',data)
//角色删除
export const roledelete = (data:any)=>http.post('/api/roledelete',data)
// ----------------------管理员管理------------------------
//管理员登录
export const userlogin = (data:any)=>http.post('/api/userlogin',data)
//管理员列表
export const getuserlist = (data:any)=>http.get('/api/userlist',data)
//管理员的添加
export const useradd = (data:any)=>http.post('/api/useradd',data)
//管理员获取
export const userinfo = (data:any)=>http.get('/api/userinfo',data)
//管理员修改
export const useredit = (data:any)=>http.post('/api/useredit',data)
//管理员删除
export const userdelete = (data:any)=>http.post('/api/userdelete',data)
//管理员总数
export const usercount = ()=>http.get('/api/usercount')